# fpc makefile

######## CC, LIBS, NAME, OPTIONS are defined in $(ACEDB_MACHINE)_DEF

CCFLAGS =   ## to undefine any rubbish
GCFLAGS =   ## to undefine any rubbish

CLAM_COMMON_OBJS = proj.o clam.o c2am.o \
	next.o batch.o editproj.o ibc.o check.o \
	summary.o graph.o ctg2chr.o score.o precomp.o \
        cb_known_order.o cb_compute_order.o cb_display.o cb_assemble.o \
        cb_ok_contig.o cb_attic.o  ends2ends.o 

ifeq ($(MODE),PARALLEL)
CLAM_OBJS = parallel/score_parallel.o parallel/sparse.o \
	parallel/zap_parallel.o parallel/serial.o \
	parallel/parallel.o parallel/timer.o parallel/score_serial.o 
endif

ifeq ($(MODE),NON_PARALLEL)
CLAM_OBJS = cb_build.o sparse.o sulston.o shared.o
endif


RANLIB_NEEDED = true
AR_OPTIONS = rlu
#################################################################
########## Machine dependent compiler modification ##############
#################################################################

#################################################################
# In principle you should not have to edit the rest of this file
#################################################################

# suppress auto SCCS extraction
.SCCS_GET:

##################### 
CLAM_SOURCES = $(CLAM_OBJS:.o=.c) $(CLAM_COMMON_OBJS:.o=.c)

########## Compiler and library options
IDIR = -I../w/wh -I../w -I../w/w2 -I../w/whooks -I../fpp -I../clam -I../file -I../clam/new/common/shared

###############################

.KEEP_STATE:
all : clam.a($(CLAM_OBJS) $(CLAM_COMMON_OBJS))

clean:
	rm -f $(CLAM_OBJS) $(CLAM_COMMON_OBJS) clam.a

#### main program ##########################

clam.a(%.o): %.c
	$(CC) -c $< -o $*.o
	ar -rs $@ $*.o
	rm -f $*.o

